﻿// <copyright file="ICrossSection.cs" company="City of Portland, BES-ASM">
// </copyright>
// <summary>ICrossSection interface</summary>

namespace BESASM.EMGAATS.BusinessClasses
{
  using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;

  /// <summary>
  /// Interface for <see cref="CrossSection"/>
  /// </summary>
  public interface ICrossSection : IEntity
  {
    /// <summary>
    /// Gets or sets a user friendly name for this cross section shape.
    /// </summary>
    string CrossSectionName { get; set; }

    /// <summary>
    /// Gets the set of ratios that define this link cross section.
    /// </summary>
    IDictionary<double, double> Ratios { get; }

    /// <summary>
    /// The calculated area in square inches of the cross section given a specific height in inches.
    /// </summary>
    /// <param name="heightIn">The height of the cross section in inches.</param>
    /// <returns>The area of the cross section, in square inches</returns>
    double GetAreaSqIn(double heightIn);

    /// <summary>
    /// Adds a ratio to the collection of height-width ratios in the cross section
    /// </summary>
    /// <param name="relativeHeight">The relative height of the cross section from 0 (bottom) to 1 (top).</param>
    /// <param name="relativeWidth">The relative width at the given height as a ratio to the full height.</param>
    void AddRatio(double relativeHeight, double relativeWidth);
  }
}
